package com.wfk.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wfk.entity.BaseInfo;
import com.wfk.mapper.BaseInfoMapper;
import com.wfk.service.IBaseInfoService;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @since 2018-12-24
 */
@Service
public class BaseInfoServiceImpl extends ServiceImpl<BaseInfoMapper, BaseInfo> implements IBaseInfoService {

	@Autowired
	private BaseInfoMapper baseInfoMapper ;
	
	@Override
	public String getByKey(String key) {
		return baseInfoMapper.getByKey(key) ;
	}
	
	@Override
	public BaseInfo getBaseInfoByKey(String key) {
		return super.getOne(new QueryWrapper<BaseInfo>().eq("key_name", key)) ;
	}
	
	@Override
	public boolean updateValByKey(BaseInfo baseInfo) {
		return baseInfoMapper.updateValByKey(baseInfo) ;
	}
}
